// CherryMerry ( Mikhail Tomilenko ), Reverse Entertainment, 2021-2024

#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "PlayerCurrencyManager.generated.h"


UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class NIFESTGAME_API UPlayerCurrencyManager : public UActorComponent
{
	GENERATED_BODY()

public:	
	UPlayerCurrencyManager();

protected:
	virtual void BeginPlay() override;

public:	
	virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;

	UPROPERTY(BlueprintReadOnly)
	int32 CurrentCurrencyAmount;

	UPROPERTY(BlueprintReadOnly)
	int32 MaxCurrencyAmount;

	UFUNCTION()
	virtual void AddCurrency(int32 AmountToAdd);

	UFUNCTION()
	virtual void UseCurrency(int32 AmountToUse);
};
